<?php

/*
 * 个人用的框架 cli模式
 * */

define('START_TIME', microtime(true));
define('START_MEMORY', memory_get_usage());
require __DIR__.'/vendor/autoload.php';

$app = require_once __DIR__.'/bootstrap/app.php';


//list($controller,$method) = ;

$controller = $argv[1];
$param = [];

foreach ($argv as $k=>$arg){
    if($k >= 2)
    $param[] = $arg;
}


$controller = 'App\\Controllers\\'.ucfirst($controller).'Controller';
(new $controller)->handle($param);//start



